Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use serving name as pg group name #1566

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

SteffenDE
Copy link
Contributor

The Nx documentation states that it is important to use the same Nx version when using distributed servings. This leads to a problem for people using blue green deployments and trying to upgrade Nx. Without some special handling, you'll often run into situations where both the old and new nodes run in the cluster at the same time. Also, if you previously tried to run different servings on different machines, this wasn't really possible, as Nx would choose a random machine from pg, so each machine in the cluster running Nx would always have to run all servings.

By separating the pg groups by serving name, we can run different servings on different nodes while keeping the cluster connected. This also allows us to upgrade Nx in a blue green deployment by encoding the Nx version into the serving name.

cc @josevalim

The Nx documentation states that it is important to use the same Nx
version when using distributed servings. This leads to a problem for
people using blue green deployments and trying to upgrade Nx. Without
some special handling, you'll often run into situations where both the
old and new nodes run in the cluster at the same time. Also, if you
previously tried to run different servings on different machines, this
wasn't really possible, as Nx would choose a random machine from pg,
so each machine in the cluster running Nx would always have to run all
servings.

By separating the pg groups by serving name, we can run different servings
on different nodes while keeping the cluster connected. This also allows
us to upgrade Nx in a blue green deployment by encoding the Nx version
into the serving name.
@josevalim josevalim merged commit f0b3f10 into elixir-nx:main Dec 12, 2024
8 checks passed
@josevalim
Copy link
Collaborator

💚 💙 💜 💛 ❤️

SteffenDE added a commit to SteffenDE/nx that referenced this pull request Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants